function musedcall(url, areaID) {
	var http_request = false;
	if (window.XMLHttpRequest) { 
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/html');
		}
	} else if (window.ActiveXObject) {
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		try {
			http_request = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e) {}
		}
	}
	if (!http_request) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}
	http_request.onreadystatechange = function() { 
		if (http_request.readyState == 4) {
			if (http_request.status == 200) {
				document.getElementById(areaID).innerHTML = http_request.responseText
			} else {
				alert('There was a problem with the request.');
			}
		} else if (http_request.readyState == 1) {
			document.getElementById(areaID).innerHTML = "<div align='center' style='padding:10px 0px 10px 0px'><img src='images/loading.gif'></div"
		}
	};
	//flush ie cache problem
	if (url.indexOf("?")!=-1){
		url = url+"&ie=" + new Date().getTime();
	}else{
		url = url+"?ie=" + new Date().getTime();
	}
	http_request.open('GET', url, true);
	http_request.send(null);
}

//form 
function musedform(pageload, formname)
	{
      var objects=document[formname].elements;
      var l=objects.length;
	  var formURL = pageload+"?"
	  
      for (var i=0; i<l; i++)     {
		formURL = formURL+objects[i].name+"="+objects[i].value+"&"
	  } 		
	  //alert(formURL)
musedcall(formURL, 'content')

}


//top nav selection
var currentTab = 'td1'
function toptab(tabnum){
	document.getElementById(currentTab).style.background= "url(images/topnav_tab.gif)";
	document.getElementById(currentTab).style.backgroundRepeat="no-repeat";
	
	document.getElementById(tabnum).style.background="url(images/topnav_tab_w.gif)";
	document.getElementById(tabnum).style.backgroundRepeat="no-repeat";
	currentTab = tabnum
}

//leftnav color change
function color(obj){
var trs=document.getElementById("leftNav").getElementsByTagName('tr');
    for(var i=0; i < trs.length; i++)
    {
        var cells = trs[i].getElementsByTagName('td');
		
        for(var p=0; p < cells.length; p++)
        {
              cells[p].style.backgroundColor='#EFF2F9';
        }
    }
    currentCells = obj.getElementsByTagName('td');
	
    for(var n=0;n<currentCells.length;n++)
    {
        currentCells[n].style.backgroundColor = '#ffffff';
    }
}

//musedpopper positioning
function getObject( obj ) {

  // step 1
  if ( document.getElementById ) {
    obj = document.getElementById( obj );
  // step 2
  } else if ( document.all ) {
    obj = document.all.item( obj );
  //step 3
  } else {
    obj = null;
  }
  //step 4
  return obj;
  }
  
  
  function moveObject( obj, e ) {

  // step 1
  var tempX = 0;
  var tempY = 0;
  var offset = 5;
  var objHolder = obj;
  // step 2
  obj = getObject( obj );
  if (obj==null) return;
  // step 3
  if (document.all) {
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {
    tempX = e.pageX;
    tempY = e.pageY;
  }
  // step 4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  // step 5
  obj.style.top  = (tempY + offset- 0) + 'px';
  obj.style.left = (tempX + offset - 0) + 'px';
  // step 6
  displayObject( objHolder, true );
  }
  
  function displayObject( obj, show ) {
  // step 1
  obj = getObject( obj );
  if (obj==null) return;
  // step 2
  obj.style.display = show ? 'block' : 'none';
  obj.style.visibility = show ? 'visible' : 'hidden';
  }
//coopy lin to clipboard - only in IE
function ClipBoard()
{
holdURL.innerText = copyURL.innerText;
Copied = holdURL.createTextRange();
Copied.execCommand("Copy");
alert("URL was copied to clipboard")
}


